package com.shuang.common;

import java.util.Random;

public class CodeRandomUtil {
		
	public static String sixCodeNoRepeat(){
		Random ra1 = new Random();
		StringBuffer sbf1 = new StringBuffer();
		while (sbf1.length() < 6) {
			int num = ra1.nextInt(10);
			if (sbf1.indexOf(String.valueOf(num)) < 0) {
				sbf1.append(num);
			}
		}
		return sbf1.toString();
	}
}
